#include <iostream>
#include <netpp/httpstream>
#include <netpp/except>

int
main(int argc, char **argv)
{
    using namespace std;
    using namespace netpp;

    string text;

    try
    {
        httpclient client(argv[1], atoi(argv[3]));
        text = client.get(argv[2]);
        cout << text << endl;
    }
    catch(Exception &e)
    {
        cout << e.what() << endl;
        return EXIT_FAILURE;
    }

    return EXIT_SUCCESS;
}
